package com.gmall.product.feign;

import com.gmall.common.result.Result;
import com.gmall.model.product.BaseTrademark;
import com.gmall.model.product.SkuInfo;
import com.gmall.model.product.dto.Category123IdNameDTO;
import com.gmall.product.feign.impl.ProductApiFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient(value = "service-product",fallback = ProductApiFeignClientFallback.class)
public interface ProductApiFeignClient {

    @PostMapping("/admin/product/sku/getSkuInfoListAfterDateTime")
    public List<SkuInfo> getSkuInfoListAfterDateTime(@RequestBody Map searchMap);

    @GetMapping("/admin/product/sku/getSkuInfoById/{skuId}")
    public Result<SkuInfo> getSkuInfoById(@PathVariable Long skuId);

    @GetMapping("/admin/product/baseTrademark/get/{id}")
    public Result<BaseTrademark> getTrademarkById(@PathVariable Long id);

    @GetMapping("/admin/product/baseCategory/getCategory123IdNameDTO/{category3Id}")
    public Result<Category123IdNameDTO> getCategory123IdNameDTO(@PathVariable Long category3Id);
}
